<template>
  <div class="page">
    <div style="flex: 0">
      <!-- <user-nav></user-nav> -->
      <navigator></navigator>
    </div>
    <div style="flex: 1">
      <router-view v-if="isShow" />
    </div>
    <div class="bottom-area" style="flex: 0">
        <footer-nav></footer-nav>
    </div>
  </div>
</template>

<script>
export default {
  name: "VipPageframe",
  components: {
    navigator: () => import("./components/navigator"),
    footerNav: () => import("./components/footerNav"),
    // userNav: () => import("./components/userNav"),
  },
  // 提供可注入子组件属性
  provide() {
    return {
      reload: this.reload,
    };
  },
  data() {
    return {
      // 控制router-view的隐藏与展示
      isShow: true,
    };
  },
  mounted() {},
  methods: {
    reload() {
      // 先隐藏
      this.isShow = false;

      // $nextTick() 将回调延迟到下次 DOM 更新循环之后执行
      this.$nextTick(() => {
        this.isShow = true;
      });
    },
  },
};
</script>

<style lang="scss" scoped>
.top-area {
  background-color: #fff;
}
.bottom-area {
  background-color: #fff;
}
</style>
